package com.zf.yichat.vo;

/**
 * 一句话描述功能
 *
 * @author fengsong
 * @date create in 18:44 2019/5/30 2019
 */
public enum MissionStatus {

    //0已发布  1已完成 2已终止
    publich(0, "已发布"), complete(1, "已完成"), terminate(2, "已终止");

    MissionStatus(Integer val, String desc) {
        this.val = val;
        this.desc = desc;

    }

    private int val;
    private String desc;

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getVal() {
        return val;
    }

    public void setVal(int val) {
        this.val = val;
    }

    public static MissionStatus valOf(Integer status) {
        for (MissionStatus m : MissionStatus.values()) {
            if (m.getVal() == status) {
                return m;
            }
        }

        return null;
    }
}
